const users = [
	{ id: 0, name: 'Umi', nickName: 'U', gender: 'MALE' },
	{ id: 1, name: 'Fish', nickName: 'B', gender: 'FEMALE' },
];

export default {
	'GET /api/v1/queryUserList': (req: any, res: any) => {
		res.json({
			success: true,
			data: { list: users },
			code: 0,
		});
	},
	'POST /api/login': (req: any, res: any) => {
		if(req.body.username==="root"&&req.body.password==="123"){
			res.json({
				data: {
					token: "test-token",
					avatar: "chrome://favicon2/?size=24&scaleFactor=1x&showFallbackMonogram=&pageUrl=https%3A%2F%2Fgitee.com%2Fzijid%2F",
					username: "test-username",
					role:"user"
				},
				code: 0,
			});
		}else{
			res.json({
				data:"登陆失败",
				code: 400,
			});
		}
	},
	'PUT /api/v1/user/': (req: any, res: any) => {
		res.json({
			success: true,
			code: 0,
		});
	},
};
